#include "scene_start.h"
#include <iostream>

SceneStart::SceneStart(CGE::SceneID id, CGE::App* m_app) :
	Scene(id, m_app)
{
}

SceneStart::~SceneStart()
{
}

void SceneStart::Init()
{
	CGE::Scene::Init();

	img.LoadFromFile("TEST7B.png");
	sprite.SetImage(img);
	vis = false;
	app->SetUpdateRate(100);
	clock.Reset();
}

void SceneStart::ReInit()
{
}

void SceneStart::Events(sf::Event event)
{
	if (event.Type == sf::Event::KeyPressed && event.Key.Code == sf::Key::F12)
	{
		if (!vis)
		{
			app->stat_manager.SetShow(true);
			vis = true;
		}
		else
		{
			app->stat_manager.SetShow(false);
			vis = false;
		}
	}
}

void SceneStart::Update()
{
	float time = clock.GetElapsedTime();
	clock.Reset();
	std::cout << time << "\n";
}

void SceneStart::Draw()
{
	app->window.Draw(sprite);
}

void SceneStart::Cleanup()
{
	CGE::Scene::Cleanup();
}
